<template>
	<view>
		<u-navbar :background="background">
			<view class="ft_16 fw-b">
				全部评价
			</view>
		</u-navbar>
		<view class="content" style="padding: 8px 15px;">
			<view class="display p_top_10" style="align-items: flex-start;background-color: #FFFFFF;margin-bottom: 8px;" v-for="(item,index) in pingjiaList" :key="index">
				<view class="" style="width: 40px;height: 40px;margin-right: 10px;">
					<image :src="item.avatar" style="width: 40px;height: 40px;border-radius: 50%;"></image>
				</view>
				<view class="" style="width: 100%;">
					<view class="display just_space p_bottom_10">
						<view class="ft_12 c-333">{{item.username}}</view>
						<view class="ft_10 c-999">{{item.createtime}}</view>
					</view>
					<view class="ft_12 c-666 p_bottom_10">{{item.title}}</view>
					<view class="display" style="flex-flow: wrap;">
						<image :src="item1" mode="aspectFill" style="width: 80px;height: 80px;border-radius: 5px;margin: 0 10px 10px 0;" v-for="(item1,index1) in item.images" :key="index1" @click="$all.preview2(item.images,index1)"></image>
					</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background:{backgroundColor: '#ffffff',}, //导航栏背景
				id:"", //商品id
				pingjiaList:[], //评价
			}
		},
		onLoad(e) {
			if(e.id){
				this.id=e.id
			}
			this.pingjiaInfo() //获取商品评价信息
		},
		methods: {
			pingjiaInfo(){ //评价信息
				this.$myRequest('goods/evaluate',{
					goods_id:this.id
				}).then(res=>{
					console.log(res.data);
					let data=res.data.data
					if(res.data.code==1){
						this.pingjiaList=data.evaluate
					}
				})
			},
			
		}
	}
</script>

<style lang="scss">
page{
	background-color: #fafafa;
}
.content{
	.con_1{
		
	}
}

</style>
